Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge_gate for control/dense with new cmake #183

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

KowerKoint
Copy link
Contributor

#180 を新しいcmake用に移動したものです。

@@ -267,7 +267,8 @@ FLOAT_DECLARE_CLASS(SqrtYGateImpl)
FLOAT(Fp)
ComplexMatrix<Fp> SqrtYdagGateImpl<Fp>::get_matrix() const {
internal::ComplexMatrix<Fp> mat(2, 2);
mat << 0, StdComplex<Fp>(0, -1), StdComplex<Fp>(0, 1), 0;
mat << StdComplex<Fp>(0.5, -0.5), StdComplex<Fp>(0.5, -0.5), StdComplex<Fp>(-0.5, 0.5),
StdComplex<Fp>(0.5, -0.5);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#182 の時に間違って貼り付けてしまったようです…

@@ -328,7 +329,7 @@ FLOAT(Fp)
ComplexMatrix<Fp> RXGateImpl<Fp>::get_matrix() const {
internal::ComplexMatrix<Fp> mat(2, 2);
mat << std::cos(this->_angle / 2), StdComplex<Fp>(0, -std::sin(this->_angle / 2)),
StdComplex<Fp>(0, std::sin(this->_angle / 2)), std::cos(this->_angle / 2);
StdComplex<Fp>(0, -std::sin(this->_angle / 2)), std::cos(this->_angle / 2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#177 で移植ミスがあったようです

static_assert(internal::lazy_false_v<void>, "unknown GateImpl");
}
template <std::floating_point Fp>
constexpr Fp eps = eps_<Fp>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他のテストでも精度ごとのepsを使えるようにしました

@KowerKoint KowerKoint marked this pull request as ready for review November 20, 2024 03:31
Copy link
Contributor

@Glacialte Glacialte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KowerKoint KowerKoint merged commit 2eabac4 into set-precision-cmake Nov 22, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants